import React from 'react';
import { Box, Toast } from 'gestalt';

const ToastMsg = ({ show, message }) => (
  show && (
    <Box
      dangerouslySetInlineStyle={{
        __style: {
          top: 340,
          left: '50%',
          transform: 'translateX(-50%)'
        }
      }}
      position='fixed'
    >
      <Toast color='orange' text={message} />
    </Box>
  )
)

export default ToastMsg;